{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "adf0aee1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入正确的班级：网新2班\n",
      "请输入正确的姓名：qiuxingqian\n",
      "登录成功 qiuxingqian\n",
      "作为我们尊敬的会员，您还有 9 次查询机会~\n",
      "请输入正确的日期：Monday\n",
      "【上课提醒】\n",
      "星期一\n",
      "上午\n",
      "课程名称：创业基础（实践）【廖汉腾】\n",
      "课程时间：09：45-12：00\n",
      "上课地点：1-401\n",
      "-------------------------\n",
      "下午\n",
      "课程名称：python语言【许智超】\n",
      "课程时间：14：30-16：50\n",
      "上课地点：2实203\n"
     ]
    }
   ],
   "source": [
    "user_data = \"网新2班\"\n",
    "password_data = \"qiuxingqian\"\n",
    "week_data = \"Monday\"\n",
    "\n",
    "count = 11\n",
    "while True:\n",
    "    count -= 1\n",
    "    \n",
    "    username = input(\"请输入正确的班级：\")\n",
    "    password = input(\"请输入正确的姓名：\")\n",
    "    \n",
    "    if username == user_data:\n",
    "        if password == password_data: \n",
    "            if count == -1:\n",
    "                print(\"您好，您的使用次数已用完~\")\n",
    "                break\n",
    "            elif 0<count<11:\n",
    "                print(\"登录成功\",password)\n",
    "                print(\"作为我们尊敬的会员，您还有\",count-1,\"次查询机会~\")\n",
    "    \n",
    "        else:\n",
    "            if count == 6:\n",
    "                print(\"您好，您的使用次数已用完~\")\n",
    "                break\n",
    "            else:   \n",
    "                print(\"登录成功，欢迎使用\")\n",
    "                print(\"作为普通用户，您还有\",count-6,\"次查询机会~\")\n",
    "                \n",
    "    # 输入要查询的星期            \n",
    "    week_time = input(\"请输入正确的日期：\")\n",
    "    if week_time == week_data:\n",
    "        print(\"【上课提醒】\");print(\"星期一\");\n",
    "        print(\"上午\")\n",
    "        print(\"课程名称：创业基础（实践）【廖汉腾】\");print(\"课程时间：09：45-12：00\");print(\"上课地点：1-401\")\n",
    "        print(\"-\"*25)\n",
    "        print(\"下午\")\n",
    "        print(\"课程名称：python语言【许智超】\");print(\"课程时间：14：30-16：50\");print(\"上课地点：2实203\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d3a885fc",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
